Skip to content

Comments

feat(seeds): generate more workshops for performance testing#2499

Open
mroderick wants to merge 5 commits intocodebar:masterfrom
mroderick:feature/seeds-performance-data
Open

feat(seeds): generate more workshops for performance testing#2499
mroderick wants to merge 5 commits intocodebar:masterfrom
mroderick:feature/seeds-performance-data

Conversation

@mroderick
Copy link
Collaborator

@mroderick mroderick commented Feb 21, 2026

Motivation

The existing seeds.rb generated ~60 past workshops, which was insufficient for detecting performance issues during local development. With more data, N+1 queries and missing indexes become immediately obvious.

Also, the coaches page (/coaches) was empty because:

  1. No attended workshop invitations existed (coaches need attended: true to appear in wall_of_fame)
  2. No skill tags were assigned to coaches

Analysis

  • Original seeds: ~60 past workshops over 5 years (1 every 6 months)
  • New seeds: ~1000 past workshops + ~100 future workshops
  • Scaled coaches/students from 50 to 500 each
  • Added ~25,000 workshop invitations for realistic query patterns
  • Added ~5,500 attended workshop invitations for coaches
  • Added skill tags to ~70% of coaches

This makes performance issues visible early in development rather than surfacing in production.

Coaches Page Improvements

The /coaches page now displays:

  • Coaches with attended workshop invitations (sorted by attendance count)
  • Skill tags for each coach using acts_as_taggable_on :skills

Example data:

  • 5,544 attended workshop invitations created
  • 10 skill tags (javascript, ruby, python, react, java, go, c++, swift, php, git)
  • ~100 coaches appear in wall_of_fame for current year

Fixes

Fixes #2302

@mroderick mroderick force-pushed the feature/seeds-performance-data branch from ba94cd5 to 1accc09 Compare February 21, 2026 09:52
Motivation:
The existing seeds.rb generated ~60 past workshops, which was insufficient
for detecting performance issues during local development. With more data,
N+1 queries and missing indexes become immediately obvious.

Analysis:
- Original seeds: ~60 past workshops over 5 years (1 every 6 months)
- New seeds: ~1000 past workshops + ~100 future workshops
- Scaled coaches/students from 50 to 500 each
- Added ~25,000 workshop invitations for realistic query patterns

This makes performance issues visible early in development rather than
surfacing in production.

Fixes codebar#2302
- Add attended workshop invitations for coaches (wall_of_fame query requires attended: true)
- Use skill_list instead of tag_list (acts_as_taggable_on :skills)
- Avoid duplicate invitations by tracking existing invitees per workshop
- ~70% of coaches get random skill tags from predefined list
@mroderick mroderick force-pushed the feature/seeds-performance-data branch from 1accc09 to 35a1777 Compare February 21, 2026 14:58
@mroderick mroderick marked this pull request as ready for review February 21, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve seeds.rb with more workshops

1 participant